#ifndef _Dictionary_h
#define _Dictionary_h

#include "CxxUtils.h"
#include "LangUtils.h"

class DoOpDictionary
{
public: 
	class ds_dict : public _DoOperator
	{
	protected: 
		ds_dict(const ds_dict &);
		ds_dict& operator=(const ds_dict &);
	public: 
		ds_dict() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_left : public _DoOperator
	{
	protected: 
		ds_left(const ds_left &);
		ds_left& operator=(const ds_left &);
	public: 
		ds_left() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_right : public _DoOperator
	{
	protected: 
		ds_right(const ds_right &);
		ds_right& operator=(const ds_right &);
	public: 
		ds_right() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_length : public _DoOperator
	{
	protected: 
		ds_length(const ds_length &);
		ds_length& operator=(const ds_length &);
	public: 
		ds_length() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
		
		virtual bool match(DevilSemantic &state) const;
	};

	class ds_maxlength : public _DoOperator
	{
	protected: 
		ds_maxlength(const ds_maxlength &);
		ds_maxlength& operator=(const ds_maxlength &);
	public: 
		ds_maxlength() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_begin : public _DoOperator
	{
	protected: 
		ds_begin(const ds_begin &);
		ds_begin& operator=(const ds_begin &);
	public: 
		ds_begin() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_end : public _DoOperator
	{
	protected: 
		ds_end(const ds_end &);
		ds_end& operator=(const ds_end &);
	public: 
		ds_end() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_def : public _DoOperator
	{
	protected: 
		ds_def(const ds_def &);
		ds_def& operator=(const ds_def &);
	public: 
		ds_def() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_load : public _DoOperator
	{
	protected: 
		ds_load(const ds_load &);
		ds_load& operator=(const ds_load &);
	public: 
		ds_load() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_store : public _DoOperator
	{
	protected: 
		ds_store(const ds_store &);
		ds_store& operator=(const ds_store &);
	public: 
		ds_store() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_get : public _DoOperator
	{
	protected: 
		ds_get(const ds_get &);
		ds_get& operator=(const ds_get &);
	public: 
		ds_get() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
		
		virtual bool match(DevilSemantic &state) const;
	};

	class ds_put : public _DoOperator
	{
	protected: 
		ds_put(const ds_put &);
		ds_put& operator=(const ds_put &);
	public: 
		ds_put() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
				
		virtual bool match(DevilSemantic &state) const;
	};

	class ds_undef : public _DoOperator
	{
	protected: 
		ds_undef(const ds_undef &);
		ds_undef& operator=(const ds_undef &);
	public: 
		ds_undef() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_known : public _DoOperator
	{
	protected: 
		ds_known(const ds_known &);
		ds_known& operator=(const ds_known &);
	public: 
		ds_known() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_where : public _DoOperator
	{
	protected: 
		ds_where(const ds_where &);
		ds_where& operator=(const ds_where &);
	public: 
		ds_where() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_copy : public _DoOperator
	{
	protected: 
		ds_copy(const ds_copy &);
		ds_copy& operator=(const ds_copy &);
	public: 
		ds_copy() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
		
		virtual bool match(DevilSemantic &state) const;
	};

	class ds_forall : public _DoOperator
	{
	protected: 
		ds_forall(const ds_forall &);
		ds_forall& operator=(const ds_forall &);
	public: 
		ds_forall() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
		
		virtual bool match(DevilSemantic &state) const;
	};

	class ds_currentdict : public _DoOperator
	{
	protected: 
		ds_currentdict(const ds_currentdict &);
		ds_currentdict& operator=(const ds_currentdict &);
	public: 
		ds_currentdict() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_errordict : public _DoOperator
	{
	protected: 
		ds_errordict(const ds_errordict &);
		ds_errordict& operator=(const ds_errordict &);
	public: 
		ds_errordict() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_$error : public _DoOperator
	{
	protected: 
		ds_$error(const ds_$error &);
		ds_$error& operator=(const ds_$error &);
	public: 
		ds_$error() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_systemdict : public _DoOperator
	{
	protected: 
		ds_systemdict(const ds_systemdict &);
		ds_systemdict& operator=(const ds_systemdict &);
	public: 
		ds_systemdict() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_userdict : public _DoOperator
	{
	protected: 
		ds_userdict(const ds_userdict &);
		ds_userdict& operator=(const ds_userdict &);
	public: 
		ds_userdict() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_globaldict : public _DoOperator
	{
	protected: 
		ds_globaldict(const ds_globaldict &);
		ds_globaldict& operator=(const ds_globaldict &);
	public: 
		ds_globaldict() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_statusdict : public _DoOperator
	{
	protected: 
		ds_statusdict(const ds_statusdict &);
		ds_statusdict& operator=(const ds_statusdict &);
	public: 
		ds_statusdict() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_countdictstack : public _DoOperator
	{
	protected: 
		ds_countdictstack(const ds_countdictstack &);
		ds_countdictstack& operator=(const ds_countdictstack &);
	public: 
		ds_countdictstack() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_dictstack : public _DoOperator
	{
	protected: 
		ds_dictstack(const ds_dictstack &);
		ds_dictstack& operator=(const ds_dictstack &);
	public: 
		ds_dictstack() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_cleardictstack : public _DoOperator
	{
	protected: 
		ds_cleardictstack(const ds_cleardictstack &);
		ds_cleardictstack& operator=(const ds_cleardictstack &);
	public: 
		ds_cleardictstack() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	static void push(_DoDictionaryMultimap& dict) {
		dict.put(CRefPtr< _DoObject >(new DoName("dict")), CRefPtr< _DoObject >(new ds_dict()));
		dict.put(CRefPtr< _DoObject >(new DoName("left")), CRefPtr< _DoObject >(new ds_left()));
		dict.put(CRefPtr< _DoObject >(new DoName("right")), CRefPtr< _DoObject >(new ds_right()));
		dict.put(CRefPtr< _DoObject >(new DoName("length")), CRefPtr< _DoObject >(new ds_length()));
		dict.put(CRefPtr< _DoObject >(new DoName("maxlength")), CRefPtr< _DoObject >(new ds_maxlength()));
		dict.put(CRefPtr< _DoObject >(new DoName("begin")), CRefPtr< _DoObject >(new ds_begin()));
		dict.put(CRefPtr< _DoObject >(new DoName("end")), CRefPtr< _DoObject >(new ds_end()));
		dict.put(CRefPtr< _DoObject >(new DoName("def")), CRefPtr< _DoObject >(new ds_def()));
		dict.put(CRefPtr< _DoObject >(new DoName("load")), CRefPtr< _DoObject >(new ds_load()));
		dict.put(CRefPtr< _DoObject >(new DoName("store")), CRefPtr< _DoObject >(new ds_store()));
		dict.put(CRefPtr< _DoObject >(new DoName("get")), CRefPtr< _DoObject >(new ds_get()));
		dict.put(CRefPtr< _DoObject >(new DoName("put")), CRefPtr< _DoObject >(new ds_put()));
		dict.put(CRefPtr< _DoObject >(new DoName("undef")), CRefPtr< _DoObject >(new ds_undef()));
		dict.put(CRefPtr< _DoObject >(new DoName("known")), CRefPtr< _DoObject >(new ds_known()));
		dict.put(CRefPtr< _DoObject >(new DoName("where")), CRefPtr< _DoObject >(new ds_where()));
		dict.put(CRefPtr< _DoObject >(new DoName("copy")), CRefPtr< _DoObject >(new ds_copy()));
		dict.put(CRefPtr< _DoObject >(new DoName("forall")), CRefPtr< _DoObject >(new ds_forall()));
		dict.put(CRefPtr< _DoObject >(new DoName("currentdict")), CRefPtr< _DoObject >(new ds_currentdict()));
		dict.put(CRefPtr< _DoObject >(new DoName("errordict")), CRefPtr< _DoObject >(new ds_errordict()));
		dict.put(CRefPtr< _DoObject >(new DoName("$error")), CRefPtr< _DoObject >(new ds_$error()));
		dict.put(CRefPtr< _DoObject >(new DoName("systemdict")), CRefPtr< _DoObject >(new ds_systemdict()));
		dict.put(CRefPtr< _DoObject >(new DoName("userdict")), CRefPtr< _DoObject >(new ds_userdict()));
		dict.put(CRefPtr< _DoObject >(new DoName("globaldict")), CRefPtr< _DoObject >(new ds_globaldict()));
		dict.put(CRefPtr< _DoObject >(new DoName("statusdict")), CRefPtr< _DoObject >(new ds_statusdict()));
		dict.put(CRefPtr< _DoObject >(new DoName("countdictstack")), CRefPtr< _DoObject >(new ds_countdictstack()));
		dict.put(CRefPtr< _DoObject >(new DoName("dictstack")), CRefPtr< _DoObject >(new ds_dictstack()));
		dict.put(CRefPtr< _DoObject >(new DoName("cleardictstack")), CRefPtr< _DoObject >(new ds_cleardictstack()));
	}
};

#endif
